import 'package:taonile/generated/json/base/json_field.dart';
import 'package:taonile/generated/json/user_info_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class UserInfoEntity {
  late int code = 0;
  late String msg;
  late UserInfoData data;

  UserInfoEntity();

  factory UserInfoEntity.fromJson(Map<String, dynamic> json) => $UserInfoEntityFromJson(json);

  Map<String, dynamic> toJson() => $UserInfoEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class UserInfoData {
  late String id;
  late String name;
  late String mobile;
  late String nickname;
  @JSONField(name: "total_assets")
  late String totalAssets;
  @JSONField(name: "asset_vouchers")
  late String assetVouchers;
  @JSONField(name: "shopping_wallet")
  late String shoppingWallet;
  @JSONField(name: "fund_wallet")
  late String fundWallet;
  late String usdt;
  late String qdys;
  @JSONField(name: "is_reporting")
  late String isReporting;
  late String pid;
  late String node;
  @JSONField(name: "level_id")
  late String levelId;
  @JSONField(name: "copartner_id")
  late String copartnerId;
  late String referrer;
  @JSONField(name: "node_list")
  late String nodeList;
  late String gender;
  late String avatar;
  @JSONField(name: "level_name")
  late String levelName;
  @JSONField(name: "copartner_name")
  late String copartnerName;
  @JSONField(name: "stock_num")
  late String stockNum;

  @JSONField(name: "floating_stock")
  late String floatingStock;

  @JSONField(name: "stock_certificates")
  late String stockCertificates;

  UserInfoData();

  factory UserInfoData.fromJson(Map<String, dynamic> json) => $UserInfoDataFromJson(json);

  Map<String, dynamic> toJson() => $UserInfoDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
